<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title> main window </title>

    <script type="text/javascript">
        // main js function
        function fMain(){
            alert('main function execute success');
        }

        // exec iframe function
        function exec_iframe(){
            window.myframe.fIframe();
        }
    </script>

</head>

<body>
<p>A.html main</p>
<p><input type="button" value="exec iframe function" onclick="exec_iframe()"></p>
<iframe src="B.html" name="myframe" width="500" height="100"></iframe>
</body>
</html>